package com.lanou3g.demo.cost.service;

import com.lanou3g.demo.entity.Cost;
import com.lanou3g.demo.mapper.CostMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CostService implements ICostService {
    @Autowired
    private CostMapper costMapper;
    @Override
    public List<Cost> findAll(int start, int count) {
        return costMapper.findAll(start, count);
    }

    @Override
    public int insertOne(Cost cost) {
        return costMapper.insertOne(cost);
    }

    @Override
    public int updateOne(Cost cost) {
        return costMapper.updateOne(cost);
    }

    @Override
    public int stsrtOne(Cost cost) {
        return costMapper.stsrtOne(cost);
    }

    @Override
    public boolean deleteOne(Cost cost) {
        return costMapper.deleteOne(cost);
    }

    @Override
    public Map<String, Integer> findTotal() {
        return costMapper.findTotal();
    }
}
